Skip to content

docs(ui): move non-config files out of .storybook directory#2597

Merged
ghostdevv merged 2 commits intonpmx-dev:mainfrom
cylewaitforit:sb-move-non-config
Apr 20, 2026
Merged

docs(ui): move non-config files out of .storybook directory#2597
ghostdevv merged 2 commits intonpmx-dev:mainfrom
cylewaitforit:sb-move-non-config

Conversation

@cylewaitforit
Copy link
Copy Markdown
Contributor

@cylewaitforit cylewaitforit commented Apr 20, 2026

🔗 Linked issue

🧭 Context

This PR moves non-config files that could change more frequently out of the .storybook directory.

📚 Description

Moved files that aren't part of the global storybook configs into app/storybook directory.

Moved the MSW handlers into mocks directory more closely following the suggestions from https://mswjs.io/docs/best-practices/structuring-handlers/.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 20, 2026 1:08pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 20, 2026 1:08pm
npmx-lunaria Ignored Ignored Apr 20, 2026 1:08pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4cdf2702-6beb-4497-9621-c6b7809d83ca

📥 Commits

Reviewing files that changed from the base of the PR and between 401472b and b7b9045.

📒 Files selected for processing (10)
  • .storybook/main.ts
  • app/pages/about.stories.ts
  • app/pages/pds.stories.ts
  • app/pages/recharging.stories.ts
  • app/pages/settings.stories.ts
  • app/storybook/colors.mdx
  • app/storybook/guidelines.mdx
  • app/storybook/mocks/handlers.ts
  • app/storybook/typography.mdx
  • app/storybook/welcome.mdx
✅ Files skipped from review due to trivial changes (3)
  • app/pages/settings.stories.ts
  • app/pages/pds.stories.ts
  • app/pages/about.stories.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/pages/recharging.stories.ts
  • .storybook/main.ts

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Reorganised internal testing infrastructure and file structure for improved code maintainability.

Walkthrough

Storybook config updated to reference a specific welcome MDX file; several page stories now import MSW handlers from ../storybook/mocks/handlers instead of the previous ../../.storybook/handlers location.

Changes

Cohort / File(s) Summary
Storybook configuration
​.storybook/main.ts
Replaced .storybook/docs MDX globs with an explicit welcome document path at ../app/storybook/welcome.mdx in the stories discovery list. Addons, framework, and viteFinal remain unchanged.
Page story MSW handler imports
app/pages/about.stories.ts, app/pages/pds.stories.ts, app/pages/recharging.stories.ts, app/pages/settings.stories.ts
Updated MSW handler import paths from ../../.storybook/handlers to ../storybook/mocks/handlers for contributorsHandler, pdsUsersHandler, repoStatsHandler, and i18nStatusHandler. Story parameters and exports unchanged.

Suggested reviewers

  • ghostdevv
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: relocating non-configuration files out of the .storybook directory to a more appropriate location.
Description check ✅ Passed The description is related to the changeset, explaining the motivation (avoiding Chromatic cache invalidation) and detailing the file relocations made in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cylewaitforit
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@cylewaitforit cylewaitforit marked this pull request as ready for review April 20, 2026 12:01
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.storybook/main.ts:
- Around line 8-9: The explicit welcome entry
'../app/design-docs/storybook-welcome.mdx' is being matched again by the
catch-all '../app/**/*.@(mdx|stories.@(js|ts))'; update the catch-all glob to
exclude that specific file using picomatch negation so the file is only indexed
once—for example replace the second pattern with a negated form that omits
'design-docs/storybook-welcome' (i.e. change
'../app/**/*.@(mdx|stories.@(js|ts))' to a pattern using !(...):
"../app/**/!(design-docs/storybook-welcome).@(mdx|stories.@(js|ts))" while
keeping the explicit '../app/design-docs/storybook-welcome.mdx' entry for
sidebar ordering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 05983184-3b2e-4faa-b43b-2f122b410089

📥 Commits

Reviewing files that changed from the base of the PR and between 67b1322 and 401472b.

📒 Files selected for processing (10)
  • .storybook/main.ts
  • app/design-docs/colors.mdx
  • app/design-docs/guidelines.mdx
  • app/design-docs/storybook-welcome.mdx
  • app/design-docs/typography.mdx
  • app/mocks/handlers.ts
  • app/pages/about.stories.ts
  • app/pages/pds.stories.ts
  • app/pages/recharging.stories.ts
  • app/pages/settings.stories.ts

Comment thread .storybook/main.ts Outdated
Comment thread .storybook/main.ts Outdated
@ghostdevv ghostdevv marked this pull request as draft April 20, 2026 12:54
@ghostdevv ghostdevv added this pull request to the merge queue Apr 20, 2026
Merged via the queue into npmx-dev:main with commit 5131302 Apr 20, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants